#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main()
{
	string str;
	getline(cin, str, '\n');
	vector<string> v;
	string tmp;
	for (size_t i = 0; i < str.size(); ++i)
	{
		if (str[i] != ' ')
		{
			tmp += str[i];
		}
		else if (str[i] == ' ')
		{
			v.push_back(tmp);
			tmp = "";
		}
	}
	v.push_back(tmp);
	int left = 0, right = v.size() - 1;
	while (left < right)
	{
		string tmp2 = v[left];
		v[left] = v[right];
		v[right] = tmp2;
		++left;
		--right;
	}
	for (auto& e : v)
	{
		cout << e << " ";
	}
	return 0;
}